"""
输入某年某月某日，判断这一天是这一年的第几天?
"""
year = int(input("请输入年份:"))
month = int(input("请输入月份:"))
day = int(input("请输入日期:"))

months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
if (year % 400 == 0) or (year % 4 == 0 and year % 100 != 0):
    months[1] = 29  # 闰年二月为29天

day_of_year = sum(months[:month - 1]) + day
print(f"{year}年{month}月{day}日是这一年的第{day_of_year}天")
